﻿Public Class clCasillaPared : Inherits clCasilla : Implements IEquatable(Of clCasillaPared)

    Public Sub New(ByRef Objeto As Control) 'funciona
        MyBase.New(ElSuelo.Inaccesible, Objeto)
        ImagenPredeterminada = My.Resources.pared
        If Objeto.GetType = GetType(PictureBox) Then
            TryCast(Objeto, PictureBox).BackgroundImage = ImagenPredeterminada
        End If
    End Sub
    Public Overloads Function Equals(ByVal Pared As clCasillaPared) As Boolean Implements System.IEquatable(Of clCasillaPared).Equals
        Return clCasilla.Equals(Me, Pared)
    End Function
    Public Overloads Shared Function Equals(ByVal ParedA As clCasillaPared, ByVal ParedB As clCasillaPared) As Boolean
        Return ParedA.GetType = ParedB.GetType And ParedA.Control.Name = ParedB.Control.Name
    End Function
End Class
